--陆上天国
local lushangtianguo = fk.CreateSkill{
    name = "mcdh_lushangtianguo",
    tags = {Skill.Lord}
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

lushangtianguo:addEffect(lib.AfterAmmoAndCharge,{
    can_trigger =  function(self, event, target, player, data)
        return player:hasSkill(self) and target ~= player and data.type == "ammo" and target:getMark("mcdh_ammo") >= 1 and lib.mcdh_getLoseammo(player) > 0
    end,
    on_cost = function(self, event, target, player, data)
        local room = player.room
        return room:askForSkillInvoke(target, self.name, nil, "#mcdh_lushangtianguo:"..player.id)
    end,
    on_use  = function(self, event, target, player, data)
        lib.AmmoAndCharge({from = target,num = 1,type="ammo",skil_name =self.name,method = "Lose"})
        lib.AmmoAndCharge({from = player,num = 1,type="ammo",skil_name =self.name,method = "Load"})
    end
})

Fk:loadTranslationTable{
    ["mcdh_lushangtianguo"] = "陆上天国",
    [":mcdh_lushangtianguo"] ="主公技，其他角色装填弹药后，其可以失去一枚弹药并令你装填一枚弹药。",
    ["#mcdh_lushangtianguo"] = "陆上天国:失去一枚弹药并令 %src 装填一枚弹药。",
}
return lushangtianguo